<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.common.enums.IsPass"%>
<%@page import="com.blockchain.front.service.security.SecurityManage"%>
<html>
<head>
<%
String str = languageDefine.getValue(request, "verified_verified");
String _TITLE_ = str + "- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
CURRENT_SUB_CATEGORY="SMRZ"; 
PC_TITLE_NAME="SMRZ";
SecurityManage manage = serviceSession.getService(SecurityManage.class);
UserManage usManage=serviceSession.getService(UserManage.class);
User us=usManage.getUser();
int i=manage.getZp();
%>
<title><%=_TITLE_ %></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<%@include file="/WEB-INF/include/header.jsp"%>
<%@include file="/WEB-INF/include/authenticatedSession.jsp"%>
<div class="autobox">
 <div class="now">
<a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.Index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_home")%></a>&gt; <a href="<%=controller.getViewURI(request, com.blockchain.front.servlets.security.index.class)%>" class="orange"><%=languageDefine.getValue(request, "menu_safeCenter")%></a> &gt; <%=languageDefine.getValue(request, "verified_verified")%>
 </div>
 <div class="assets_center clear po_re zin70">
  <%@include file="/WEB-INF/include/aqzx/left.jsp"%>
   <div class="assets_content w900 right bg_w">
            <div class="safe_center clear"
                 style="padding-left: 0px;">
                <h1 style="margin-top: 0px; margin-bottom: 15px; line-height: 15px;"><%=languageDefine.getValue(request, "verified_verified")%></h1>
            </div>
            <div class="sj" style="top: 40px; left: 60px;"></div>
                        <br> <br>
            <div class="pwtrade">
                    <%if(StringHelper.isEmpty(us.name)||StringHelper.isEmpty(us.zjh)){%>
                    <div class="band_no" style="padding-left: 116px;">
                        <em></em><%=languageDefine.getValue(request, "verified_notPassVerified")%>
                    </div>
					<%}else{%>
					 <div class="band_succ" style="padding-left: 116px;">
                        <em></em><%=languageDefine.getValue(request, "verified_passedVerified")%>
                    </div>
                     <%}%>
                    <div class="set_verify">
                        <ul>
                            <li><%=languageDefine.getValue(request, "verified_identityInfo")%></li>
                            <li><%=languageDefine.getValue(request, "verified_name")%>：<%StringHelper.filterHTML(out,us.name);%></li>
                            <li><%=languageDefine.getValue(request, "verified_certificateType")%>：<%if(us.certificateType!=null){%><%=us.certificateType.getName()%><%}%></li>
                            <li><%=languageDefine.getValue(request, "verified_IDCarNum")%>：
                            	<%if(!StringHelper.isEmpty(us.zjh)){%>
								<%StringHelper.filterHTML(out, us.zjh.substring(0, us.zjh.length()/2)+"******");%>
							<%}%>
                            </li>
                            <%if(us.cjsj!=null){%>
                            <li><%=languageDefine.getValue(request, "verified_verifiedTime")%>：<%=TimestampParser.format(us.cjsj)%></li>
                            <%}%>
                        </ul>
                    </div>
                    	 <%if(i>0&&us.gjrz==null){%>
                    	 <div class="band_high_no" style="padding-left: 116px;">
                            <em></em><%=languageDefine.getValue(request, "verified_waitingCheck")%>
                        </div>
                    	 <%}else{%>
                        <div class="band_high<%if(us.gjrz!=null&&us.gjrz==IsPass.S){%> band_succ<%}else{%>_no<%}%>" style="padding-left: 116px;">
                            <em></em><%if(us.gjrz!=null&&us.gjrz==IsPass.S){%><%=languageDefine.getValue(request, "verified_passedSuperVerified")%><%}else{%><%=languageDefine.getValue(request, "verified_notPassSuperVerified")%>,<%StringHelper.filterHTML(out,manage.getYy());%><%}%>
                        </div>
                        <%}%>
                        <%if(us.gjrz!=IsPass.S){%>
                        <form id="form-nameauth"  onsubmit="return onSubmit()" action="<%=controller.getURI(request, Smrz.class)%>" method="post" class="form-horizontal" enctype="multipart/form-data">
                        <table style="margin-left: 69px;text-align: center;width:758px;">
                            <tr class="controls" style="width:100%;height:70px;padding-bottom:20px;">
                                <td style="width:50%;">
                                    <div id="addpicContainer">
                                        <span class="upload-span po_re">
                                         <!--没有图片显示默认图片-->
                                         <img id="up_img" style="cursor: pointer; max-width: 376px; max-height: 260px;" title="点击添加图片" alt="点击添加图片" src="<%=controller.getStaticPath(request)%>/images/addimg.png">
                                         <input  name="z" onchange="preview(this)" type="file" id="inputfile" style="height: 29px;width:100px;cursor: pointer;opacity: 0;z-index: 10;position: absolute; left: 6px; top: -19px;" value="">
                                    </span>
                                    </div>
                                </td>
                                <td style="width:50%;">
                                    <div id="addpicContainer2">
                                        <span class="upload-span po_re">
                                        <!--没有图片显示默认图片-->
                                        <img id="up_img2" style="cursor: pointer; max-width: 376px; max-height: 260px;" title="点击添加图片" alt="点击添加图片" src="<%=controller.getStaticPath(request)%>/images/addimg.png">
                                        <input name="f" onchange="preview2(this)" type="file" id="inputfile2"  style="height: 29px;width:100px;cursor: pointer;opacity: 0;z-index: 10;position: absolute; left: 6px; top: -19px;">
                                    </span>
                                    </div>
                                </td>
                            </tr>
                            <tr class="controls">
                                <td class="item-label"><%=languageDefine.getValue(request, "verified_positivePhoto")%></td>
                                <td class="item-label"><%=languageDefine.getValue(request, "verified_negativePhoto")%></td>
                            </tr>
                            <tr class="form-item cf" style="height: 150px;">
                                <td colspan="2">
                                    <div class="pwtrade" style="width:100%;">
                                        <dl style="width:100%;">
                                            <dd style="width:100%;">
                                                <input type="submit" value="确认上传" style="width: 100%;" class="btn submit-btn ajax-post" target-form="form-horizontal" >
                                            </dd>
                                        </dl>
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <div class="set_verify_img">
                            <div class="sv_title"><%=languageDefine.getValue(request, "verified_superVerifiedProcess")%>：</div>
                            <div class="hide_btn"
                                 onclick="$(this).toggleClass('hide_active');$('.sv_text').slideToggle('slow');"></div>
                            <div class="sv_text">
                                <p>
                                    <span>1.</span><%=languageDefine.getValue(request, "verified_pleaseUpload")%>
                                </p>
                                <div class="set_verify_img_pic clear">
                                    <div class="sv_pic">
                                        <img src="<%=controller.getStaticPath(request)%>/images/pic.jpg" alt="">
                                    </div>
                                    <span><%=languageDefine.getValue(request, "verified_example")%></span>
                                </div>
                                <p>
                                    <span>2.</span><%=languageDefine.getValue(request, "verified_checkAfter")%>
                                </p>
                                <p>
                                    <span>3.</span><%=languageDefine.getValue(request, "verified_applySuccess")%>
                                </p>
                                <p>
                                    <%=languageDefine.getValue(request, "verified_applyFailure")%><br>
                                </p>
                            </div>
                        </div>
                    </form>
                    <%}%>
            </div>
        </div>
 </div>
</div>
<div id="all_mask" class="all_mask" style="height: 100%; display: none;">
<div style="width:200px;position: fixed;left:50%;top: 50%;z-index: 1001;margin-top:-31px;margin-left:-100px;display: block;" id="yl">
         <div style="width:102px;height:82px;border-radius:10px;text-align:center;padding-top: 20px;margin:0 auto;background:#fff;">
            <img src="<%=controller.getStaticPath(request)%>/images/load.gif" height="62" width="62" alt="">
         </div>
         <p style="text-align:center;color:#fff;  line-height: 30px;"><%=languageDefine.getValue(request, "verified_uploading")%></p>
</div>
</div>
<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript">
	var filesize1 = 0;
	var filesize2 = 0;
	var Max_Size = 2000; //2M
	var maxSize = Max_Size * 1024;
	function preview(file){
		var fileData = file.files[0];
		filesize1 = fileData.size;
		if(!chencsize()){
			return;
		}
		if (file.files && fileData){  
			var reader = new FileReader();  
			reader.onload = function(evt){  
				$('#up_img').attr("src",evt.target.result );
			}
			reader.readAsDataURL(fileData);  
		}
	} 
	
	function preview2(file){ 
		var fileData = file.files[0];
		filesize2 = fileData.size; 
		if(!chencsize1()){
			return;
		}
		if (file.files && fileData){  
			var reader = new FileReader();
			reader.onload = function(evt){  
				$('#up_img2').attr("src",evt.target.result );
			}
			reader.readAsDataURL(fileData);  
		}
	}
	
	function chencsize(){
		console.log(filesize1);
		if(filesize1 > maxSize){
			alert("手持身份证正面照超过2M限制！");
			return false;
		}
		return true;
	}
	
	function chencsize1(){
		console.log(filesize2);
		if(filesize2 > maxSize){
			alert("手持身份证反面照超过2M限制！");
			return false;
		}
		return true;
	}
	
	
	function onSubmit(){
		if(!chencsize()){
			return;
		}
		if(!chencsize1()){
			return;
		}
		 if ($('#inputfile').val() == '' && $('#inputfile2').val() == '') {
			 alert('<%=languageDefine.getValue(request, "js_choosePhoto")%>');
			 return false;
	     }
		 $("#all_mask").show();
		 return true;
	}
	<%String error = controller.getPrompt(request,response,PromptLevel.ERROR);if(!StringHelper.isEmpty(error)){%>
	layer.open({
	title: '<%=languageDefine.getValue(request, "js_tip")%>',
	content: '<%=languageDefine.getValue(request,error)%>'
	});  
	<%}%>
	</script>